Configuring Connection Failover and Client Load Balancing for the ADO Client

The ADO Client can help you make sure that your critical data is available even if the primary database server is unavailable:

Using Connection Failover

Connection failover allows an application to connect to an alternate, or backup, database server if the primary database server is unavailable, for example, because of a hardware failure or traffic overload. Connection failover ensures that the data on which your critical ADO applications depend is always available.

To configure connection failover, you must specify a list of alternate database servers that are tried at connection time if the primary SequeLink server is not accepting connections. To do this, specify the Alternate Servers connection option on the Options tab of the Setup dialog box or in the connection string. (See "Configuring ADO Client Data Sources" for details.) Connection attempts continue until a connection is successfully established or until all the database servers in the list have been tried once (the default).

IMPORTANT: If you specify an LDAP server and also enable connection failover, the alternate servers must be LDAP servers. The data provider will access the servers using the LDAP protocol.

Optionally, you can specify the following additional connection failover features:

Using Connection Retry

Connection retry defines the number of times the driver attempts to connect to the primary SequeLink Server and, if configured, alternate SequeLink Servers after the initial unsuccessful connection attempt. Connection retry can be an important strategy for system recovery. For example, suppose you have a power failure in which both the SequeLink Client and the SequeLink Server fail. When the power is restored and all computers are restarted, the SequeLink Client may be ready to attempt a connection before the SequeLink Server has completed its startup routines. If connection retry is enabled, the client application can continue to retry the connection until a connection is successfully accepted by the SequeLink Server.

Connection retry can be used in environments that have only one server or can be used as a complementary feature with connection failover in environments with multiple SequeLink Servers.

Using connection options, you can specify the number of times the driver attempts to connect and the time in seconds between connection attempts.

Connection String Example

The following connection string configures the ADO data provider connected to a Linux, UNIX, or Windows server to use connection failover in conjunction with all of its optional features-load balancing, connection retry, and connection retry delay.

Data Source=MyADODSN;User Id=test;Password=secret;Alternate Servers=(Host=
server2:Port=19996:Server Data Source=SDSN2,Host=server3:Port=19996:Server 
Data Source=SDSN3);Connection Retry Count=4;Connection Retry Delay=5;Load 
Balancing=1 

Specifically, if a successful connection is not established on the SequeLink ADO data provider's first pass through the list of SequeLink servers, this connection string configures the data provider to use two alternate servers as connection failover servers, to attempt to connect four additional times if the initial attempt fails, to wait five seconds between attempts, and to try the primary and alternate servers in a random order.

The additional connection information required for the alternate servers is specified in the SequeLink Server data source SDSN3.

Using Client Load Balancing

Client load balancing helps distribute new connections in your environment so that no one server is overwhelmed with connection requests. When client load balancing is enabled, the order in which primary and alternate database servers are tried is random.

First, SequeLink Server B is tried (1). Then, SequeLink Server C may be tried (2), followed by a connection attempt to SequeLink Server A (3). In contrast, if client load balancing were not enabled in this scenario, each SequeLink Server would be tried in sequential order, primary server first, then each alternate SequeLink server based on its entry order in the alternate servers list.

Connection Failover Properties

Table 9-2 summarizes the connection properties that control how connection failover works with the ADO Client. Refer to the SequeLink Developer's Reference for details about configuring each connection attribute.

Table 9-2. Summary: Connection Failover Connection Attributes for the ADO Client 
Connection Attribute
Characteristic
Alternate Servers
List of alternate database servers. An IP address or server name and a port number are required for each server. The Server Data Source connection property is optional.
Connection Retry Count
Number of times the data provider retries the primary database server, and if specified, alternate servers until a successful connection is established. The initial default is 0.
Connection Retry Delay
Wait interval, in seconds, between connection retry attempts when the ConnectionRetryCount property is set to a positive integer. The initial default is 3.
Load Balancing
Sets whether the data provider will use client load balancing in its attempts to connect to the list of database servers (primary and alternate). If client load balancing is enabled, the data provider uses a random pattern instead of a sequential pattern in its attempts to connect. The initial default is false (client load balancing is not used).

Refer to the SequeLink Developer's Reference for overviews of connection failover and client load balancing.